<template>
  <div>
    <child :title="title" @onSetTitle="setTitle"></child>
  </div>
</template>

<script>
import child from "./components/child.vue";
export default {
  components: {
    child,
  },
  data() {
    return {
      title: "父向传给子中的数据",
    };
  },
  methods: {
    setTitle(title) {
      this.title = title;
    },
  },
};
</script>

<style lang="scss" scoped>
</style>